package cn.yunhe.struts.controller;

import org.apache.struts2.ServletActionContext;
import com.alibaba.fastjson.JSONObject;
import cn.yunhe.struts.model.UserModel;

public class UserController4{
	

	public String queryUser(){

		UserModel user = new UserModel();
		user.setUsername("赵子龙");
		user.setUserphone("13803831229");
		
        JSONObject jsonObj=new JSONObject(); 
        jsonObj.put("user", user);
        
        ServletActionContext.getRequest().setAttribute("data", jsonObj.toString());
        
        return "success";
	}
	

}
